import request from "@/utils/request"

export interface UserLogItem {
  id: number
  username: string
  realname: string
  action: string
  createdTime: string
}

export interface UserLogQuery {
  userId?: string
  username?: string
  page: number
  pageSize: number
}

export interface UserLogListResult {
  list: UserLogItem[]
  total: number
}

// 用户日志分页API
export async function fetchUserLogPage(params: UserLogQuery): Promise<UserLogListResult> {
  const res = await request.post<UserLogListResult>("/api/admin/user/event/page/list", params)
  return res.data
}